#include "Game/Game.h"

Game::Game(NativeDisplayType hDC,NativeWindowType m_hWnd) : GameEngine(hDC,m_hWnd){
	state=0;
	if(currentCamera){
		currentCamera->cameraPos = Vec3f(0.0f,150.0f,25.0f);
		currentCamera->cameraPosT = Vec3f(0.0f,0.0f,0.0f);
		currentCamera->cameraObjetivePos = Vec3f(0.0f,0.0f,25.0f);
		currentCamera->cameraObjetivePosT = Vec3f(0.0f,0.0f,0.0f);
		currentCamera->Projection3D();
	}
}

void Game::hideNotify(){

}

void Game::showNotify(){

}

void Game::touchPressed(int index, int x, int y, int tapCount){

}

void Game::touchMoved(int index, int x, int y){

}

void Game::touchReleased(int index, int x, int y){

}

#define SKYBOX_ZOOM			150.0f
#define SKYBOX_ADJUSTUVS	true
void CreateSkybox(float scale, bool adjustUV, int textureSize, VERTTYPE* Vertices, VERTTYPE* UVs);

void Game::paint(){
	::glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
	Vec3f up = Vec3f(0.0f, 0.0f, 1.0f);
	//getCamera()->cameraPos = Vec3f::rotate(getCamera()->cameraPos,Vec3f(0.0f,0.0f,1.0f),0.5);
	currentCamera->glLookAt(currentCamera->cameraPos,currentCamera->cameraObjetivePos,up);
	switch(state){
		case 0:
			m3d=new Model3D("RES/modelo.POD");
			//initBlur();
			state++;
			break;
		case 1:
			currentSkyBox->draw(currentCamera);
			Debug::drawAxis();
			m3d->DrawModel(currentCamera->getModelViewMatrix());
			//DrawBlur(1,1);
			break;
	}
	 
}

void Game::update(){
		
}
